import request from '@/router/axios';

//查询任务列表
export function queryTask (query) {
    return request({
        url: '/cp/taskpublish/pagequery',
        method: 'get',
        params: query
    })
}
//新建任务
export function addTask (obj) {
    return request({
        url: '/cp/taskpublish',
        method: 'post',
        data: obj
    })
}
//查看任务
export function seeTask (query) {
    return request({
        url: '/cp/taskpublish/look-up',
        method: 'get',
        params: query
    })
}
// 发布任务
export function publishTask (query) {
    return request({
        url: '/cp/taskpublish/publish-on',
        method: 'post',
        params: query
    })
}
//查询群聊列表
export function queryGroupChat () {
    return request({
        url: '/cp/work-internal-group/list',
        method: 'get',
    })
}
//分页查询群聊列表
export function queryPageGroupChat (query) {
    return request({
        url: '/cp/work-internal-group/page',
        method: 'get',
        params: query
    })
}
//创建内部群
export function addGroupChat (obj) {
    return request({
        url: '/cp/work-internal-group',
        method: 'post',
        data: obj
    })
}
//查询企业成员
export function queryGroupEmployee () {
    return request({
        url: '/cp/inheritemployee/employee-query',
        method: 'get',
    })
}
//推送消息文件上传
export function upload (obj) {
    return request({
        url: '/cp/common/uploads',
        method: 'post',
        data: obj,
        headers: {
            "content-type": "multipart/form-data"
        }
    })
}
//阅读统计
export function readerStatistic (query) {
    return request({
        url: '/cp/taskpublish/task-detail',
        method: 'get',
        params: query
    })
}
